package cn.edu.nwpu.manager.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

/**
 * @author Hutengzhong
 * @version 1.0.0
 * @title Account 用户表
 * @description TODO
 * @date 2023/9/16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Account {
    private Integer userId;
    private String userAccount;
    private String userPassWord;
    private Integer userType;
    private Integer isDeleted;

    public Account(HashMap parameters) {
        if (parameters == null){
            return;
        }else {
            try {
                if (parameters.containsKey("userAccount")){
                    this.userAccount = (String) parameters.get("userAccount");
                }
                if (parameters.containsKey("userPassWord")){
                    this.userPassWord = (String) parameters.get("userPassWord");
                }
            }catch (Exception e){
                System.out.println("前端传递参数转化异常: 参考类型异常");
            }
        }
    }
}
